const express = require('express');
const {addReturnInfoService, getReturnListService, updateReturnService} = require("../service/returnSchoolService");
const router = express.Router();

// 添加返校信息
router.post('/', async function (req, res, next) {
    res.send(await addReturnInfoService(req.body))
})
// 分页获取返校信息
router.get('/', async function (req, res, next) {
    res.send(await getReturnListService(req.query.page, req.query.limit))
})
// 修改某个返校信息
router.put('/:id', async function (req, res, next) {
    res.send(await updateReturnService(req.params.id, req.body))
})

module.exports = router;
